home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 136_01 / terminal.doc < prev    next >
Text File  |  1980-01-01  |  10KB  |  241 lines

  1.  
  2. /*    HEADER:  CUG136.16;
  3.     TITLE:        TERMINAL;
  4.     DATE:        7/1/86;
  5.     DESCRIPTION:    "Terminal installation program documentation";
  6.     SYSTEM:        CP/M;
  7.     FILENAME:    TERMINAL.DOC;
  8.     AUTHORS:    R. Rodman;
  9. */
  10.  
  11.  
  12. This disk contains games
  13. and  a  (quasi-)universal  terminal  definition  system.   Before 
  14. running  any of the other programs,  run TERMINAL to  create  the 
  15. file   TERMINAL.
  16.  Other   terminal  configuration   methods 
  17. described  in  your  newsletter  don't  allow  for  object   code 
  18. portability,  whereas  this  one does and has been used with  not 
  19. only C but also BASIC,  Pascal and assembler. The games were fun 
  20. projects of mine and I've decided to put them all into the public 
  21. domain.  I only learned C recently,  so two were converted  from 
  22. Basic,  the  other from assembler (Don't criticize my C too much! 
  23. Give  me  a  chance!).   They  are  written  in  C/80  (Software 
  24. Toolworks),  which  means they should be easily portable  to  any 
  25. Unix-compatible C.
  26.  
  27. Here is a listing of the files on the disk:
  28.  
  29. DUMPSTAR.C, .SUB, .COM -  Dump Star video game
  30. TZ.C, .R, .COM, .DOC -  Twilight Zone adventure game
  31.  
  32.   NO FAIR READING TZ.R! (Maybe we ought to squeeze it?)
  33.  
  34. CMAZE.C, .SUB, .COM -     Perspective maze game
  35.    (Careful - doesn't use TERMINAL.SYS; also does direct
  36.    port I/O to an AY-3-9513 Cricket at ports B0,B1 hex)
  37. TERMINAL.C, .COM, .DOC -   Terminal configuration program
  38. RDTERM.C, .COM -       Check your terminal configuration
  39. RANDOM.C -          Random function for C/80
  40. PORTIO.C -          I/O port access for C/80
  41. CUG.LTR -           this letter
  42.  
  43. Someone can probably improve upon my random number generator. It 
  44. is  pretty crude.  If anyone installs any terminals beyond  what 
  45. TERMINAL  supports,  I'd like to get a copy of the new values  so 
  46. that the program can be enhanced.
  47. .pa
  48. Other projects I have underway are a 68000 cross-assembler and an 
  49. operating system. Once the cross-assembler is complete I want to 
  50. make  a  small-C for the 68000 which will then be used  with  the 
  51. operating  system  as  well as  other  projects.  Currently  the 
  52. operating system is in Z80 assembler.  When this is finished  it 
  53. will  all become public domain.  If anyone is working on similar 
  54. projects, I'd sure like to get in touch with them.
  55.  
  56. Have fun and ... C you later!
  57.  
  58.                   Richard Rodman
  59.                   6607 Mayfair Drive #302
  60.                   Falls Church VA 22042
  61.                   (703) 241-1681
  62. .FOThird Planet Productions, P.O. Box 3268, McLean VA 22103
  63.  
  64. HOW TO CONFIGURE OUR PROGRAMS
  65. FOR YOUR SYSTEM -
  66.  
  67. All  Third Planet Productions programs are configured by means of 
  68. a universal Terminal File. This file is read by programs written 
  69. in BASIC,  PASCAL and assembler,  and will be used in all  future 
  70. TPP  software  releases as well.  The programmers out there  are 
  71. encouraged to use it as well.
  72.  
  73. The first step in configuring the program is to find out
  74. WHAT KIND OF TERMINAL YOU HAVE.
  75. If you have a Televideo 950, STOP! That's the default.
  76.  
  77. There  is  a library of terminal configurations which comes  with 
  78. the program (TERMINAL.LIC).  Your terminal/computer might be  in 
  79. the library already. 
  80. The configurations currently supported are:
  81.  
  82.    TeleVideo 920   TeleVideo 950   Visual 200   Heath H19
  83.    Osborne I     ANSI Standard   MAX-80     Hazeltine
  84.    Perkin-Elmer Fox DEC VT-52
  85.  
  86. If  the configuration you need is not in the  library,  you  will 
  87. need  to  get  your  terminal manual and  look  up  your  control 
  88. sequences.  Some  of  the terminals included in the library  are 
  89. listed here a little later.  Backed up by this,  you're ready to 
  90. bring up the TERMINAL program (TERMINAL.COM).   This is done  as 
  91. follows:
  92.  
  93. A>TERMINAL (Double width shows what you type in)
  94.  
  95. Which console do you wish to configure? In a single-user system, 
  96. it's always console 0 (zero). In multi-user MP/M configurations, 
  97. each console may be a different terminal type.
  98.  
  99. If you can use one of the configurations supplied in the  library 
  100. then use the R option in the program. When you select R you will 
  101. be asked if you wish to configure for a variety of terminals. If 
  102. you  don't  wish  to  use a particular  configuration  answer  N; 
  103. otherwise  answer  Y  and the program will be set  to  use  that 
  104. terminal/computer.  It's that simple!
  105.  
  106. If  there  isn't  an entry in the library that  applies  to  your 
  107. machine  then  you  will  need to  use  the  C  option.  Control 
  108. characters  should  be  entered as a ^ (caret)  followed  by  the 
  109. upper-case letter.  For example,  control-R would be entered  as 
  110. ^R. In particular, the escape code (ESC) would be entered as ^[. 
  111. The Home command for a Televideo would be entered as ^^.
  112.  
  113. Few  of the programs use all of the various entries in the  file. 
  114. Most   will  operate  with  just  the  Clear  Screen  and  Cursor 
  115. Addressing parameters.
  116. .pa
  117. After  you enter your codes you might want to enter them into the 
  118. library for future use. You can do this with the A option. (You 
  119. might want to test your configuration before putting it into  the 
  120. library.  If  so,then you can test it using the method explained 
  121. in  the next paragraph.  Then you can reenter TERMINAL  and  add 
  122. your settings to the library.) 
  123.  
  124. You can test how well your terminal is configured by running  the 
  125. RDTERM program:
  126.  
  127. A>RDTERM
  128.  
  129. The various messages printed test what they say they are testing.
  130. (Honest!)
  131.  
  132. If  you are unable to decipher your terminal manual,  please feel 
  133. free  to  write us.  In fact,  when you order  programs  in  the 
  134. future, mention the type of terminal you have, and we may be able 
  135. to  pass along some information on how to configure it better for 
  136. our  software.  Also if you have a configuration that we do  not 
  137. support,  we  would appreciate hearing from you:  either  in  the 
  138. questionaire, your next order or in a separate note.)
  139. .PA
  140.  
  141.       TERMINAL FILE FORMAT
  142.  
  143. This  document describes the file format of the standard terminal 
  144. definition  file.  This  file is generated by a  program  called 
  145. TERMINAL.COM and is named TERMINAL.SYS.
  146.  
  147. The  file has a record length of 128 characters,  divided into 16 
  148. 8-byte  fields.  There  is  one record for each console  in  the 
  149. system. Each field consists of a 0 to 7 ASCII characters, padded 
  150. with  at  least one null.  If the function is  unavailable,  the 
  151. first byte should be a null.
  152.  
  153. In most cases,  the entire field can be printed.  In the case of 
  154. cursor  addressing,  this is not advisable.  The following BASIC 
  155. function can be used to truncate the field string:
  156.  
  157. DEF FNS$(O$)=LEFT$(O$,INSTR(O$,CHR$(0))-1)
  158.  
  159. Field  Mnemonic  Description
  160.  
  161.  1         Miscellaneous parameters:
  162.      WIDTH      1 Screen width in columns (1 byte)
  163.      HEIGHT      2 Screen height in lines (1 byte)
  164.      DEFINT      3 Default intensity: 'L'=Low 'H'=High
  165.      USELST      4 Use last: 'Y'=Can print in last position
  166.                without scrolling
  167.           Cursor addressing parameters:
  168.      SNDFST      5 Send first: 'Y' or 'X'
  169.      METHOD      6 Method: '0'=Binary
  170.                '1'=ASCII-Decimal, req'd no. of chars
  171.                '2'=ASCII-Decimal, 2 characters
  172.                '3'=ASCII-Decimal, 3 characters
  173.      XADD       7 X addend
  174.      YADD       8 Y addend
  175.  
  176.  2   INISTR   Initialization string
  177.              (put terminal into ANSI mode, etc.)
  178.  3   CLRSCN   Clear Screen
  179.  4   CLREOS   Clear to end of screen
  180.  5   CLREOL   Clear to end of line
  181.  6   CUROFF   Turn cursor off
  182.  7   CURON   Turn cursor on
  183.  8   CURBEG   Cursor addressing - Lead-in
  184.  9   CURMID   Cursor addressing - between X and Y
  185.  10   CUREND   Cursor addressing - Trailer
  186.  11   HIINT   Begin High intensity
  187.  12   LOINT   Begin Low intensity
  188.  13   REVVID   Begin Reverse video
  189.  14   NORVID   End Reverse Video
  190.  15   INSLIN   Insert Line
  191.  16   DELLIN   Delete Line
  192. .pa
  193.  
  194.            Some Typical Terminals
  195.  
  196. The following are some of the settings for the terminals that are 
  197. in  the  terminal library.  When entering your  own  codes,  the 
  198. characte